package com.mq;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.stereotype.Component;

@Component
public class Consumer2 {

    @JmsListener(destination = "Consumer")
    @SendTo("Consumer2")
    public String receiveQueue(String text) {
        System.out.println("Consumer收到的信息为:"+text);
        return "return message"+text;
    }
}
